package com.dyna.foundation.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dyna.constants.DateFatter;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author zcw
 * @description dept
 * @date 2025-07-04
 */
@Data
@ApiModel("sys_dept")
@TableName(value = "sys_dept")
public class SysDept implements Serializable {

    private static final long serialVersionUID = 1L;

    public static final Long PARENT_ID_ROOT = 0L;

    @ApiModelProperty("部门id")
    @TableId(value = "dept_id", type = IdType.AUTO)
    private Long deptId;

    @ApiModelProperty("浙政钉部门code")
    private String orgCode;


    @ApiModelProperty("父部门id")
    private Long parentId;


    @ApiModelProperty("浙政钉父级部门code")
    private String orgParentCode;


    @ApiModelProperty("祖级列表")
    private String ancestors;


    @ApiModelProperty("机构编码")
    private String deptCode;


    @ApiModelProperty("社会统一信用代码")
    private String creditCode;


    @ApiModelProperty("部门名称")
    private String deptName;


    @ApiModelProperty("单位类型（1 分类 2 单位 3 部门）")
    private Integer deptType;


    @ApiModelProperty("部门级别")
    private Long level;


    @ApiModelProperty("显示顺序")
    private Long orderNum;


    @ApiModelProperty("部门状态（0正常 1停用）")
    private Integer status;


    @ApiModelProperty("删除标志（0代表存在 2代表删除）")
    private Integer delFlag;


    @ApiModelProperty("创建者")
    private Long createBy;


    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = DateFatter.YYYY_MM_DD_HH_MM_SS)
    private LocalDateTime createTime;


    @ApiModelProperty("更新者")
    private Long updateBy;


    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = DateFatter.YYYY_MM_DD_HH_MM_SS)
    private LocalDateTime updateTime;


    @ApiModelProperty("备注")
    private String remark;

}